﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using fsw.Common;
using System.IO;

namespace fsw.Web
{
    public partial class VerifyCode : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            MemoryStream ms = new MemoryStream();
            YZMHelper y = new YZMHelper();
            y.CreateImage();
            System.Drawing.Bitmap b = y.Image;
            Session[DTKeys.SESSION_CODE] = y.Text;
            b.Save(ms, System.Drawing.Imaging.ImageFormat.Png);
            Response.ClearContent();
            Response.ContentType = "image/Png";
            Response.BinaryWrite(ms.ToArray());        
        }
    }
}